package cn.edu.cimv.service.impl;

import cn.edu.cimv.dao.entity.Patent;
import cn.edu.cimv.dao.mapper.PatentMapper;
import cn.edu.cimv.service.PatentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 门铎 on 2016/6/27.
 */
@Service
public class PatentServiceImpl implements PatentService {
    @Autowired private PatentMapper patentMapper;
    @Override
    public void editPatent(Patent patent) {
        patentMapper.insertPatent(patent);
    }

    @Override
    public List<Patent> queryPatent() {
        return patentMapper.queryPatent();
    }

    @Override
    public void deletePatent(int id) {
        patentMapper.deletePatent(id);
    }

    @Override
    public Patent queryPatentById(int id) {
        return patentMapper.queryPatentById(id);
    }

    @Override
    public void updatePatent(Patent patent) {
        patentMapper.updatePatent(patent);
    }
}
